<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">试验审核</block>
		</cu-custom>
		<scroll-view scroll-y class="page">
			<view style="height: 10rpx;"></view>
			<view v-if="dataList.length==0" class="no-data">未查询到数据</view>
			<u-test v-else v-for="(item,index) in dataList" :data="item" :key="index">
			</u-test>
		</scroll-view>
	</view>
</template>

<script>
import uTest from '../../components/u-audit/u-test.vue'
	export default {
		data() {
			return {
				dataList: []
			}
		},
		onShow: function() {
			this.loadData();
		},
		components: {
			uTest
		},
		methods: {
			loadData() {
				uni.request({
					url: this.$http + '/biz/bizTodoAssign/getTestApproveList?page=1&limit=10000&status=301',
					//data: this.param,
					header: {
						token: uni.getStorageSync("token")
					},
					method: 'POST',
					success: (res) => {
						if (res.statusCode == 200 && res.data.code == 0) {
							this.dataList = res.data.page.list;
							console.log(this.dataList)
						} else {
							uni.showToast({
								icon: 'none',
								title: '查询数据失败，请重试！'
							});
						}
					},
					fail: function() {
						uni.showToast({
							icon: 'none',
							title: '服务器请求超时！'
						});
					}
				})
			}
		}
	}
</script>

<style>
  .no-data {
	  text-align: center;
  }
</style>
